﻿#ifndef __DEMANDCONTROLLER__
#define __DEMANDCONTROLLER__

#include "BaseKit.h"

class DemandController:public CAViewController{
public:
	static DemandController* create(unsigned int demandId);
protected:
	DemandController(unsigned int demandId);
	virtual ~DemandController();
	void viewDidLoad();
	void fillData(const string& data);
	void speciesData(const string& data);
	void addressData(const string& data);
private:
	char* url="/api/appDemandInfo";
	unsigned int demandId;
	CATextField* person;
	CATextField* phone;
	CSJson::Value speciesDatas;
	CATextField* category;
	CATextField* categoryName;
	std::string specifications="通货";
	CACheckbox* boutique;
	CACheckbox* currency;
	CATextField* price;
	CATextField* quantity;
	std::string area;
	unsigned int receiveAreaCode=0;
	CATextField* receiveArea;
	CATextField* location;
	unsigned int areaCode=0;
	CATextField* areaName;
	CATextField* supplyingTime;
	CATextField* remark;
	double deposit=0;
	CALabel* money;
	int payment=0;
	CALabel* payments;
	CAVector<CAValue*> paymentV;
	CAPickerView* cityView;
	CAPickerView* countyView;
	CSJson::Value cityDatas;
	CSJson::Value countyDatas;
	unsigned int I=0;
	unsigned int II=0;
};

#endif